<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>beerparse</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/beerwatch/">beerwatch</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Module&nbsp;beerparse
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="beerparse-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module beerparse</h1><p class="nomargin-top"><span class="codelink"><a href="beerparse-pysrc.html">source&nbsp;code</a></span></p>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="beerparse-module.html#parseBeers" class="summary-sig-name">parseBeers</a>(<span class="summary-sig-arg">path</span>)</span><br />
      Read in the list of beers and parse information for each one.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#parseBeers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="beerparse-module.html#parseSection" class="summary-sig-name">parseSection</a>(<span class="summary-sig-arg">contents</span>,
        <span class="summary-sig-arg">linkregex</span>,
        <span class="summary-sig-arg">category</span>,
        <span class="summary-sig-arg">sloader</span>)</span><br />
      Parse a section (premium,import, or discount) and return the beers.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#parseSection">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">tuple</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="beerparse-module.html#parseBrandSplash" class="summary-sig-name">parseBrandSplash</a>(<span class="summary-sig-arg">link</span>)</span><br />
      Retrieve the link where prices exist from a beer brand's splash page 
      and parse beer information.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#parseBrandSplash">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">tuple</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="beerparse-module.html#parsePriceList" class="summary-sig-name">parsePriceList</a>(<span class="summary-sig-arg">location</span>)</span><br />
      Return the parsed values (quanity,price,locationURL) of the price 
      list table</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#parsePriceList">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">string</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="beerparse-module.html#openUrl" class="summary-sig-name">openUrl</a>(<span class="summary-sig-arg">location</span>)</span><br />
      Retrieve the contents of the URL 'location'</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#openUrl">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="beerparse-module.html#stripWhiteSpace" class="summary-sig-name">stripWhiteSpace</a>(<span class="summary-sig-arg">string</span>)</span><br />
      Strip left and right whitespace from the input string</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#stripWhiteSpace">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="dumpBeers"></a><span class="summary-sig-name">dumpBeers</span>()</span><br />
      Displays all beer info to stdout</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#dumpBeers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="beerparse-module.html#dumpTotalInfo" class="summary-sig-name">dumpTotalInfo</a>(<span class="summary-sig-arg">brandInfo</span>,
        <span class="summary-sig-arg">pricing</span>)</span><br />
      Output a single parsed beer to stdout.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#dumpTotalInfo">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="beerparse-module.html#dumpPriceList" class="summary-sig-name">dumpPriceList</a>(<span class="summary-sig-arg">priceTable</span>)</span><br />
      Dump a parsed price table to stdout</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#dumpPriceList">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="beerparse-module.html#dumpBrandInfo" class="summary-sig-name">dumpBrandInfo</a>(<span class="summary-sig-arg">brandInfo</span>)</span><br />
      Dump brand information to stdout</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#dumpBrandInfo">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="cleanup"></a><span class="summary-sig-name">cleanup</span>()</span><br />
      Stops execution and closes up the active connection if any.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#cleanup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="beerparse-module.html#parsePath" class="summary-sig-name">parsePath</a>(<span class="summary-sig-arg">filepath</span>)</span><br />
      Check that database path the user wants to use  is legit.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="beerparse-pysrc.html#parsePath">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="mainUrl"></a><span class="summary-name">mainUrl</span> = <code title="'www.thebeerstore.ca'"><code class="variable-quote">'</code><code class="variable-string">www.thebeerstore.ca</code><code class="variable-quote">'</code></code><br />
      root url of the beerstore
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="mainPath"></a><span class="summary-name">mainPath</span> = <code title="'/Beers/'"><code class="variable-quote">'</code><code class="variable-string">/Beers/</code><code class="variable-quote">'</code></code><br />
      path where beer information is stored
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="connection"></a><span class="summary-name">connection</span> = <code title="None">None</code><br />
      holds the active connection to the beerstore website
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="beers"></a><span class="summary-name">beers</span> = <code title="[]"><code class="variable-group">[</code><code class="variable-group">]</code></code><br />
      list of beer objects that contain info on a single beer
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="parseBeers"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parseBeers</span>(<span class="sig-arg">path</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="beerparse-pysrc.html#parseBeers">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Read in the list of beers and parse information for each one. Parse 
  the output of 
  http://www.thebeerstore.ca/Beers/brandsearch_results.asp?brand=&amp;beertype=-
  
  +All+-&amp;category=-+All+-&amp;producer=-+All+-&amp;Submit.x=52&amp;Submit.y=19&amp;
  Submit=Submit</p>
  <p>which contains all the known beers. This output has been curled before
  hand for efficiency.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>path</code></strong> (string) - location where the sqlite3 database of parsed beers will be 
          created.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="parseSection"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parseSection</span>(<span class="sig-arg">contents</span>,
        <span class="sig-arg">linkregex</span>,
        <span class="sig-arg">category</span>,
        <span class="sig-arg">sloader</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="beerparse-pysrc.html#parseSection">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Parse a section (premium,import, or discount) and return the 
  beers.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>contents</code></strong> (string) - html of the given section</li>
        <li><strong class="pname"><code>linkregex</code></strong> (compiled regex) - see parseBeers() for the regex string</li>
        <li><strong class="pname"><code>category</code></strong> (string) - the section category. premium, import, budget etc.</li>
        <li><strong class="pname"><code>sloader</code></strong> (sqlloader object) - object for writing parsed data to the sql database</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="parseBrandSplash"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parseBrandSplash</span>(<span class="sig-arg">link</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="beerparse-pysrc.html#parseBrandSplash">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Retrieve the link where prices exist from a beer brand's splash page 
  and parse beer information.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>link</code></strong> (string) - brand id link i.e branddetails.asp?id=0151</li>
    </ul></dd>
    <dt>Returns: tuple</dt>
        <dd>tuple of (brewer,alcohol level,beer type, description, price 
          link)</dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>AttributeError</strong></code> - if no valid information was found.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="parsePriceList"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parsePriceList</span>(<span class="sig-arg">location</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="beerparse-pysrc.html#parsePriceList">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return the parsed values (quanity,price,locationURL) of the price list
  table</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>location</code></strong> (string) - URL string to open i.e 
          pricelist.asp?str=&amp;id=1710&amp;brandname=NIAGARAS+BEST+BLONDE+PREM+ALE</li>
    </ul></dd>
    <dt>Returns: tuple</dt>
        <dd>tuple with first element as a list of 3-tuples 
          (quantity,price,locationURL) and second element a string 
          representing the URL for the &quot;All Packages Sizes&quot;.</dd>
  </dl>
</td></tr></table>
</div>
<a name="openUrl"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">openUrl</span>(<span class="sig-arg">location</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="beerparse-pysrc.html#openUrl">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Retrieve the contents of the URL 'location'</p>
  <p>Open and return the html contained at the location starting at mainUrl
  + mainPath.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>location</code></strong> (string) - url to open</li>
    </ul></dd>
    <dt>Returns: string</dt>
        <dd>the html contained at the param, 'location'</dd>
  </dl>
</td></tr></table>
</div>
<a name="stripWhiteSpace"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">stripWhiteSpace</span>(<span class="sig-arg">string</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="beerparse-pysrc.html#stripWhiteSpace">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Strip left and right whitespace from the input string</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>string</code></strong> (string) - string to strip whitespace from</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="dumpTotalInfo"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">dumpTotalInfo</span>(<span class="sig-arg">brandInfo</span>,
        <span class="sig-arg">pricing</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="beerparse-pysrc.html#dumpTotalInfo">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Output a single parsed beer to stdout.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>brandInfo</code></strong> (6-tuple) - (beer name, brewer,alcohol level, type, description, price link)</li>
        <li><strong class="pname"><code>pricing</code></strong> (tuple) - (list of 3-tuple -&gt; (quanitity of beer, price, buying 
          location), and allSizes location link)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="dumpPriceList"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">dumpPriceList</span>(<span class="sig-arg">priceTable</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="beerparse-pysrc.html#dumpPriceList">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Dump a parsed price table to stdout</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>priceTable</code></strong> (list of tuples) - points to a list of 3-tuples (quantity,price,locationURL)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="dumpBrandInfo"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">dumpBrandInfo</span>(<span class="sig-arg">brandInfo</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="beerparse-pysrc.html#dumpBrandInfo">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Dump brand information to stdout</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>brandInfo</code></strong> (6-tuple) - contains (name, brewer,alcohol level, type of beer, 
          description,pricelink)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="parsePath"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">parsePath</span>(<span class="sig-arg">filepath</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="beerparse-pysrc.html#parsePath">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Check that database path the user wants to use  is legit. Check that 
  the user has the proper permissions to write/create the desired database 
  and that the path supplied is valid.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>filepath</code></strong> (string) - the path to the sqlite3 database the user wants to save the     
          parsed information to.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/beerwatch/">beerwatch</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Sep 26 19:00:20 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
